projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29b3f58
)
(hi-lock-line-face-buffer): Wrap the regexp in a group
author
Stefan Monnier
<monnier@iro.umontreal.ca>
Fri, 9 Mar 2001 21:16:18 +0000
(21:16 +0000)
committer
Stefan Monnier
<monnier@iro.umontreal.ca>
Fri, 9 Mar 2001 21:16:18 +0000
(21:16 +0000)
so ^, $, *, ? and + are interpreted correctly.
lisp/hi-lock.el
patch
|
blob
|
history
diff --git
a/lisp/hi-lock.el
b/lisp/hi-lock.el
index 610a217916f2665991e326a926d92e9a608c0f08..e37cb94d1a96d35b5928b0ead11223ae9aadb1da 100644
(file)
--- a/
lisp/hi-lock.el
+++ b/
lisp/hi-lock.el
@@
-334,7
+334,9
@@
list maintained for regexps, global history maintained for faces.
(unless hi-lock-mode (hi-lock-mode))
(or (facep face) (setq face 'rwl-yellow))
(hi-lock-set-pattern
- (list (concat "^.*" regexp ".*$") (list 0 (list 'quote face) t))))
+ ;; The \\(?:...\\) grouping construct ensures that a leading ^, +, * or ?
+ ;; or a trailing $ in REGEXP will be interpreted correctly.
+ (list (concat "^.*\\(?:" regexp "\\).*$") (list 0 (list 'quote face) t))))
;;;###autoload